﻿<UserControl x:Class="GSF.TimeSeries.UI.UserControls.MonitoringUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"              
             mc:Ignorable="d" d:DesignHeight="650" d:DesignWidth="850"
             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:uc="clr-namespace:GSF.TimeSeries.UI.UserControls"
             xmlns:tsf="clr-namespace:GSF.TimeSeries.UI"
             xmlns:tsfBinding="clr-namespace:GSF.TimeSeries.UI.Binding;assembly=GSF.TimeSeries.UI"
             Background="Transparent">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/GSF.TimeSeries.UI.WPF;Component/Resources/CommonResource.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <Grid x:Name="MonitorLayoutRoot">
        
        <Grid.RowDefinitions>
            <RowDefinition Height="12*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
                     
        <StackPanel Orientation="Vertical">
            <tsf:TsfPopup x:Name="PopupSettings" Topmost="False">
            <!--<Popup x:Name="PopupSettings">-->
                
                <Border CornerRadius="5" BorderThickness="1" Background="White" BorderBrush="Blue">
                    
                    <Grid>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="2*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <TextBlock Text="Number of Displayed Messages" Grid.Column="0" Grid.Row="0"/>
                        <TextBox x:Name="TextBoxNumberOfMessages" Grid.Row="0" Grid.Column="1" Width="50"/>

                        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Right">
                            <Button x:Name="ButtonRestore" Content="Restore Default" Margin="2" Width="Auto" Click="ButtonRestore_Click"/>
                            <Button Content="Cancel" Margin="2" Click="ButtonCancel_Click"/>
                            <Button x:Name="ButtonSave" Content="Save" Margin="2" IsDefault="True" Click="ButtonSave_Click"/>
                        </StackPanel>

                    </Grid>
                    
                </Border>
                
            <!--</Popup>-->
            </tsf:TsfPopup>

            <ScrollViewer x:Name="ScrollViewerMonitor" Background="Black" Margin="2" Height="590" 
                            VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" VerticalContentAlignment="Top">
                <ScrollViewer.Content>
                    <TextBlock x:Name="TextBlockServiceStatus" TextAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="White" TextWrapping="Wrap" Margin="2" Height="Auto" Width="800"  FontFamily="Courier New"/>
                </ScrollViewer.Content>
            </ScrollViewer>
        </StackPanel>

        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1">
            <TextBox x:Name="TextBoxServiceRequest" Width="{StaticResource XXXLargeItemSize}" GotFocus="TextBoxServiceRequest_GotFocus" />
            <Button x:Name="ButtonSendServiceRequest" Content="Send Command" Width="Auto" Click="ButtonSendServiceRequest_Click" IsDefault="True"/>
            
        </StackPanel>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1" Margin="728,10,12,12">
        <Button x:Name="ButtonDisplaySettings" Content="Display Settings" Template="{StaticResource HyperlinkStyleButtonTemplate}" 
                    Margin="25,7.5,0,0" VerticalAlignment="Center" Width="Auto" Click="ButtonDisplaySettings_Click"/>
        </StackPanel>
    </Grid>
</UserControl>
